Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Printing /


Figures, Tables, and Listings

Color Plates

Color Plate 1 Color separations

Color Plate 2 Common colors used in printing

Preface About This Book xv

Figure P-1 Roadmap to the QuickDraw GX suite of books xvi

Chapter 1 Introduction to Printing With QuickDraw GX 1-1

Figure 1-1 QuickDraw GX printing phases 1-4

Figure 1-2 QuickDraw GX printing-related objects 1-7

Figure 1-3 Dragging a document to a desktop printer icon 1-8

Figure 1-4 Default QuickDraw GX desktop printer icons 1-9

Figure 1-5 The Print dialog box 1-11

Figure 1-6 The expanded Print dialog box 1-11

Figure 1-7 The Print Time panel 1-12

Figure 1-8 The Paper Match panel 1-12

Figure 1-9 Message handlers in a message chain 1-14

Figure 1-10 Overriding the gxPrintingEvent message 1-15

Figure 1-11 Effect of specifying a shape in the form property of a format object 1-17

Figure 1-12 A paper type for printing on letterhead paper 1-18

Figure 1-13 QuickDraw GX printing-related objects 1-21

Table 1-1 QuickDraw GX printing-related objects 1-22

Figure 1-14 Printing-related items in the File menu 1-25

Figure 1-15 Manipulating the job object in response to user actions 1-27

Figure 1-16 Printing a document containing multiple formats 1-29

Chapter 2 Core Printing Features 2-1

Figure 2-1 Objects needed to implement core printing features 2-4

Figure 2-2 The job object 2-6

Figure 2-3 The format object 2-7

Figure 2-4 The paper-type object 2-8

Listing 2-1 Creating a job object for a printable document 2-12

Listing 2-2 Polling for errors after individual functions 2-15

Listing 2-3 Polling for errors after groups of functions 2-16

Listing 2-4 Override function for the gxPrintingEvent message 2-19

Listing 2-5 Using the GXPrintPage function to print a document 2-21

Listing 2-6 Using the GXStartPage, GXDrawShape, and GXFinishPage functions to print a document 2-23

Listing 2-7 Using the GXFlattenJobToHdl function to save a job object 2-25

Listing 2-8 Using the GXFlattenJob function to save a job object 2-28

Listing 2-9 Disposing of a job object when you close a document 2-29

Listing 2-10 Using the GXUnflattenJobFromHdl function to retrieve
a job object 2-30

Listing 2-11 Using the GXUnflattenJob function to retrieve a job object 2-32

Listing 2-12 Using the GXGetFormatJob function to obtain a job object 2-33

Listing 2-13 Using the GXGetFormatDimensions function 2-34

Figure 2-5 The Page Setup dialog box 2-35

Figure 2-6 The expanded Page Setup dialog box 2-36

Listing 2-14 Displaying the Page Setup dialog box 2-36

Figure 2-7 The Print dialog box 2-38

Figure 2-8 The expanded Print dialog box 2-38

Listing 2-15 Displaying the Print dialog box 2-39

Listing 2-16 Responding to the Print Documents Apple event and specifying an output printer 2-40

Listing 2-17 Updating a job when receiving resume events 2-43

Listing 2-18 Converting a print record into a job object 2-45

Chapter 3 Page Formatting and Dialog Box Customization 3-1

Figure 3-1 The job collection 3-10

Figure 3-2 The format collection 3-12

Figure 3-3 The paper-type collection 3-14

Figure 3-4 A three page document and its corresponding job and format objects 3-15

Figure 3-5 Manipulating the format object in response to user actions 3-17

Figure 3-6 Scaling a format object 3-19

Figure 3-7 Using a form to format a page 3-20

Figure 3-8 The expanded Custom Page Setup dialog box with two panels 3-22

Table 3-1 Functions that enable dialog box panels 3-23

Listing 3-1 A panel resource definition template 3-24

Table 3-2 Functions that forward a dialog box message 3-24

Listing 3-2 The extended item list resource definition template 3-26

Listing 3-3 Accessing copies information stored in a job collection 3-28

Listing 3-4 Modifying the job collection to implement the Print One Copy menu item 3-29

Listing 3-5 Replacing collection items 3-31

Listing 3-6 Setting up a default page range 3-33

Figure 3-9 Print dialog box with default page range 3-35

Listing 3-7 Setting up a replacement page range 3-35

Figure 3-10 Print dialog box with replacement page range 3-37

Listing 3-8 Setting up a customized page range 3-37

Figure 3-11 Print dialog box with customized page range 3-39

Figure 3-12 The Custom Page Setup dialog box 3-40

Figure 3-13 The expanded Custom Page Setup dialog box 3-40

Figure 3-14 A four-page document in which page two uses a unique format object 3-41

Listing 3-9 Creating a format object for a page in a document 3-42

Figure 3-15 A four-page document in which pages 2 and 3 use the same format object 3-45

Listing 3-10 Cloning a format object for two pages in a document 3-46

Figure 3-16 A four-page document in which pages 2 and 3 use unique formats objects 3-48

Listing 3-11 Disposing of a format object for a page in a document and creating a new one 3-49

Listing 3-12 Adding a form to a format object 3-51

Listing 3-13 Storing halftone information in a format collection 3-53

Figure 3-17 Moving a format object from one document to another 3-55

Listing 3-14 Moving a format object from one document to another 3-56

Listing 3-15 Obtaining a format object's mapping 3-57

Figure 3-18 A three-page document and its corresponding job object, format objects, and paper-type objects 3-58

Listing 3-16 Obtaining the paper-type object associated with a format object 3-59

Listing 3-17 Using the GXForEachJobFormatDo function 3-60

Listing 3-18 Obtaining scaling information on each format object 3-61

Listing 3-19 Saving the correspondence between format objects and document pages in a format collection 3-62

Listing 3-20 Filling the handle 3-63

Listing 3-21 Retrieving the correspondence between document pages and format objects from a format collection 3-65

Listing 3-22 Setting up a new panel 3-68

Figure 3-19 A panel added to the Custom Page Setup dialog box 3-70

Listing 3-23 Sample panel resource 3-70

Listing 3-24 Sample item list resource 3-71

Listing 3-25 Sample 'CNTL' resource 3-72

Listing 3-26 Sample extended item list resource 3-72

Listing 3-27 Sample 'MENU' resource 3-73

Listing 3-28 Installing an override function for the gxParsePageRange message 3-74

Listing 3-29 Override function for the gxParsePageRange message 3-75

Figure 3-20 Panel resource 3-127

Figure 3-21 Extended item list resource 3-128

Figure 3-22 Radio button items 3-129

Figure 3-23 Checkbox and pop-up menu items 3-130

Figure 3-24 Integer and real edit text items 3-131

Figure 3-25 String editable text items 3-132

Chapter 4 Advanced Printing Features 4-1

Figure 4-1 The printer object 4-6

Table 4-1 Printer driver types 4-7

Figure 4-2 The print file object 4-10

Table 4-2 QuickDraw GX printing synonyms 4-12

Table 4-3 Print job format modes 4-20

Listing 4-1 Obtaining the names and types of a printer and printer driver 4-22

Listing 4-2 Setting the job object's reference constant property 4-23

Listing 4-3 Getting the job object's reference constant property 4-24

Listing 4-4 Copying job object information 4-25

Listing 4-5 Determining a printer's resolution 4-26

Listing 4-6 Retrieving the printer's color profile and color space 4-27

Listing 4-7 Using the printer's color profile to convert colors 4-28

Listing 4-8 Opening and closing a print file 4-29

Listing 4-9 Reading a page from a print file 4-31

Listing 4-10 Creating a new paper-type object 4-32

Listing 4-11 Obtaining a paper-type object's name 4-32

Listing 4-12 Obtaining page and paper rectangles for a paper-type object 4-33

Listing 4-13 Executing a function for each paper-type object 4-34

Listing 4-14 Executing a procedure for each paper-type object 4-35

Table 4-4 Text job format mode query options 4-36

Table 4-5 Status type IDs 4-43

Table 4-6 The actions of the GXSetPrinterProfile function 4-87

Table 4-7 The actions of the GXSetFormatProfile function 4-89

Figure 4-3 The status resource 4-93

Table 4-8 Status types 4-94


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help